<!DOCTYPE html>
<html class="x-admin-sm">
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.1</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="__ADMIN__/css/font.css">
    <link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
    <script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>

    <script src="__ADMIN__/plus/ueditor/ueditor.config.js"></script>
    <script src="__ADMIN__/plus/ueditor/ueditor.all.min.js"></script>

    <style>
    .layui-anim {z-index: 9999!important}
    .layui-form-label {width: auto !important;}
    </style>
  </head>
  
  <body>
    <div class="x-body">
        <form class="layui-form" lay-filter="form">
          <input type="hidden" name="id" value="{$info.id}" />

          <div class="layui-form-item">
              <label for="name" class="layui-form-label">
                 客户姓名
              </label>
              <label for="name" class="layui-form-label" style="text-align:left;">
                  {$info.cname}
              </label>
          </div>
          <div class="layui-form-item">
              <label for="name" class="layui-form-label">
                 活动名称
              </label>
              <label for="name" class="layui-form-label" style="text-align:left;">
                  {$info.cactivity}
              </label>
          </div>
          <div class="layui-form-item">
              <label for="name" class="layui-form-label">
                 活动时间
              </label>
              <label for="name" class="layui-form-label" style="text-align:left;">
                  {$info.cactivity_time}
              </label>
          </div>

          <div class="layui-form-item">
              <label for="name" class="layui-form-label">
                 申请人
              </label>
              <label for="name" class="layui-form-label" style="text-align:left;">
                  {$info.aname}
              </label>
          </div>
          <div class="layui-form-item">
              <label for="time" class="layui-form-label">
                  续期时间
              </label>
              <label for="time" class="layui-form-label" style="text-align:left;">
                  {$info.time}天
              </label>
          </div>
          <div class="layui-form-item">
              <label for="L_repass" class="layui-form-label">
                审核状态
              </label>
              {switch name="info.status "}
              {case value="0"}
              <a title="通过" class='layui-btn layui-btn-xs' style="margin: 0px;" onclick="tg(this,{$info.id},1)" href="javascript:;">
                <i class="layui-icon">通过</i>
              </a>
              <a title="拒绝" class='layui-btn layui-btn-xs layui-btn-danger' style="margin: 0px;" onclick="tg(this,{$info.id},2)" href="javascript:;">
                <i class="layui-icon">拒绝</i>
              </a>
              {/case}
              {case value="1"}<label class="layui-form-label" style="text-align:left;"><button class="layui-btn layui-btn-xs layui-btn-normal">已通过</button></label>{/case}
              {case value="2"}<label class="layui-form-label" style="text-align:left;"><button class="layui-btn layui-btn-xs layui-btn-danger">未通过</button></label>{/case}
              {default /}<label class="layui-form-label" style="text-align:left;"><button class="layui-btn layui-btn-xs layui-btn-primary layui-border-black">已失效</button></label>
              {/switch}
          </div>




          <!--<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">-->
          <!--  <legend>申请原因</legend>-->
          <!--</fieldset>-->
          <!--<blockquote class="layui-elem-quote layui-quote-nm">-->
          <!--{$info.desc}-->
          <!--</blockquote>-->

      </form>
    </div>
    <script>
        //UE.getEditor('desc',{initialFrameWidth:'80%',initialFrameHeight:800});
        layui.use(['form','layer','laydate'], function(){
          $ = layui.jquery;
          var form = layui.form
          ,layer = layui.layer
          ,laydate = layui.laydate;

          
          
        });


          function tg(obj,id,status){
              if(status == 1){
                  layer.confirm('确认审核为通过吗？',function(index){
                      //发异步删除数据
                      $.ajax({
                        type:'POST',
                        dataType:'json',
                        data:{id:id,status:status},
                        url:"{:url('xuqi/tg')}",
                        success:function(o){
                          layer.msg(o.msg,{icon:o.icon,time:1500},function(){
                            location.reload();
                          });
                        }
                      });
                  });
              }else{
                  layer.confirm('确认拒绝吗？',function(index){
                      //发异步删除数据
                      $.ajax({
                        type:'POST',
                        dataType:'json',
                        data:{id:id,status:status},
                        url:"{:url('xuqi/tg')}",
                        success:function(o){
                          layer.msg(o.msg,{icon:o.icon,time:1500},function(){
                            location.reload();
                          });
                        }
                      });
                  });
              }
              
          }

    </script>
  </body>

</html>